<div id="updateAvatar">
    <b-button
        label="修改头像"
        type="is-primary is-light"
        @click="cardModal('avatar')" />
</div>

{% include 'baykeshop/user/avatar_form.html' %}

<script>
    var updateAvatar = new Vue({
        el: '#updateAvatar',
        delimiters: ['{$', '$}'],
        data:{
            formProps: {
                dropFiles: null,
                imgSrc: ''
            }
        },
        methods:{
            cardModal(status) {
                if (status == 'avatar'){
                    this.$buefy.modal.open({
                        parent: this,
                        component: AvatarModalForm,
                        hasModalCard: true,
                        customClass: 'custom-class custom-class-2',
                        trapFocus: true
                    })
                }
                
            }
        }
    })
</script>